package com.zj.fx.model.month;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.date.DateUtil;
import lombok.Data;

import java.util.Date;

@Data
public class MonthAuditSub implements Serializable {

    private static final long serialVersionUID = 1L;


    @ApiModelProperty(value = "主键ID")
    private String id;

    @ApiModelProperty(value = "任务ID")
    private String fkTaskId;

    @ApiModelProperty(value = "所属分公司ID")
    private String fkSubcompanyId;

    @ApiModelProperty(value = "所属分公司名称")
    private String subcompanyName;

    @ApiModelProperty(value = "任务状态（0未提报1已提报）")
    private String taskState;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "提报时间")
    private Date auditDate;

    @ApiModelProperty(value = "任务年月")
    private String taskMonth;

    @ApiModelProperty(value = "拓展字段--下属供电所总数")
    private String subTotal;

    @ApiModelProperty(value = "拓展字段--下属供电所未完成总数")
    private String subNotFinishTotal;

    @ApiModelProperty(value = "拓展字段--下属供电所完成总数")
    private String subFinishTotal;

    public MonthAuditSub(String id, String fkTaskId, String fkSubcompanyId, String subcompanyName, String taskState, Date auditDate, String taskMonth) {

        this.id = id;

        this.fkTaskId = fkTaskId;

        this.fkSubcompanyId = fkSubcompanyId;

        this.subcompanyName = subcompanyName;

        this.taskState = taskState;

        this.auditDate = auditDate;

        this.taskMonth = taskMonth;

    }

    public MonthAuditSub() {
        super();
    }

    public String dateToStringConvert(Date date) {
        if (date != null) {
            return DateUtil.format(date, "yyyy-MM-dd HH:mm:ss");
        }
        return "";
    }


}